# Maintainer: kpcyrd <kpcyrd[at]archlinux[dot]org>
# Maintainer: Caleb Maclennan <caleb@alerque.com>
# Contributor: KokaKiwi <kokakiwi+aur@kokakiwi.net>

_pyname=adb-shell
pkgname=python-${_pyname}
pkgver=0.4.3
pkgrel=2
pkgdesc="A Python implementation of ADB with shell and FileSync functionality."
arch=(any)
url="https://github.com/JeffLIrion/adb_shell"
license=('Apache')
depends=('python' 'python-cryptography' 'python-pyasn1' 'python-rsa')
makedepends=('python-build' 'python-installer' 'python-setuptools' 'python-wheel')
optdepends=('python-aiofiles: async API'
            'python-libusb1: To connect to a device via USB')
conflicts=('python-adb_shell')
source=("${pkgname}-${pkgver}.tar.gz"::"https://github.com/JeffLIrion/adb_shell/archive/refs/tags/v${pkgver}.tar.gz")
b2sums=('c7e49766dfa70db60eb300f747957397c252325670b40d0d7355ae321558ac671bdcc5beb6b16876b79f7d803b933c1d26d41a5799b4fe058fbdb9739442389a')

build() {
  cd "${_pyname/-/_}-${pkgver}"
  python -m build -wn
}

package() {
  cd "${_pyname/-/_}-${pkgver}"
  python -m installer -d "$pkgdir" dist/*.whl
  install -Dm644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
}

# vim: ts=2 sw=2 et:
